﻿using Permission.Abstract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Permission
{
    public class AbpPermissionDefinitionProvider : PermissionDefinitionProvider, IPermissionDefinitionProvider
    {
        public override void Define(IPermissionDefinitionContext context)
        {
            var group = context.AddGroup("SystemPermission.", "系统权限");
            group.AddPermission(OrderPermission.Order, "订单权限");
            group.AddPermission(OrderPermission.List, "订单列表");
            group.AddPermission(OrderPermission.Add, "添加订单");
            group.AddPermission(OrderPermission.Edit, "修改订单");
            group.AddPermission(OrderPermission.Delete, "删除订单");
            group.AddPermission(OrderPermission.Audit, "审核订单");
            group.AddPermission(OrderPermission.Detail, "订单详情");


            group.AddPermission(UserPermission.User, "用户权限");
            group.AddPermission(UserPermission.List, "用户列表");
            group.AddPermission(UserPermission.Add, "添加用户");
            group.AddPermission(UserPermission.Edit, "修改用户");
            group.AddPermission(UserPermission.Delete, "删除用户");
            group.AddPermission(UserPermission.Audit, "审核用户");
            group.AddPermission(UserPermission.Detail, "用户详情");
        }
    }
}
